package config.ioc;

import com.service.UserService;
import com.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class HelloIocConfig42 {

    @Autowired
    private HelloIocConfig4 config4;

    @Bean
    public UserService userService() {

        UserServiceImpl userService = new UserServiceImpl();
        userService.setDao(config4.userDao());
        return userService;
    }


}
